1. Field of the Invention
The present invention relates to facilitating the efficient querying of remote databases and subsequent use of query results by a querying application program.
2. Description of the Related Art
Relational database systems store large amounts of data, including business data that can be analyzed to support business decisions. For example, a relational database system can be used to store sales data including information on sales by time period, product, product line, geographic area, and so on, which can be usefully presented in response to a query to support a particular business decision. It will readily be appreciated that data can be presented in numerous ways to support a decision, depending on the particular decision (and, hence, query) being made.
Often, to generate information to support a decision or for other reasons an application program is invoked by a user, with the application program in turn querying a database query engine for data objects that the application program will require to support the user's purposes. In response, a query optimizer of the query engine generates an efficient query plan, and then the query engine accesses the database in accordance with the query plan. In executing the query, it is frequently the case that a large amount of data must be processed.
In executing the query plan, the query engine determines which columns from which database tables to read, and then if necessary buffers the columns to support query execution. After query execution, the buffer typically is emptied and a results set is returned to the application program. The results set ordinarily includes identifications of objects, referred to by the shorthand term of “.oid”, that satisfy the query. Using the results set, the application program then requests the objects from the database using the .oid set returned by the query engine. Accordingly, the skilled artisan will recognize that the database is accessed twice for data—once by the query engine, and subsequently by the application program to retrieve the objects identified by the query engine.
The application program and database query engine can be local to the user computer, or they can be implemented by so-called “middleware” with which the user computer communicates via a computer network, such as a local area network (LAN) or wide area network (WAN). In any event, the database itself has in the past been locally accessible to the application program and query engine, rendering the necessity of having to access the database twice somewhat inconsequential, even for data-intensive database query operations.
As recognized by the present invention, however, databases increasingly are remote from query execution and application execution “middleware”. For example, many databases on the world wide web are now accessible via the Internet. Because the data transfer rates of wide area networks such as the Internet are relatively low, accessing remote databases is relatively expensive. Indeed, accessing remote databases twice for a single operation can lead to unacceptably long delays, and in the context of data-intensive query processing and application execution, can be disastrously long. The present invention has recognized the above-noted problem and has provided the solution set forth below.